3.1811 \(\int \frac{(A+B x) \sqrt{d+e x}}{a^2+2 a b x+b^2 x^2} \, dx\)

Optimal. Leaf size=140 \[ \frac{\sqrt{d+e x} (-3 a B e+A b e+2 b B d)}{b^2 (b d-a e)}-\frac{(-3 a B e+A b e+2 b B d) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{d+e x}}{\sqrt{b d-a e}}\right )}{b^{5/2} \sqrt{b d-a e}}-\frac{(d+e x)^{3/2} (A b-a B)}{b (a+b x) (b d-a e)} \]

[Out]

((2*b*B*d + A*b*e - 3*a*B*e)*Sqrt[d + e*x])/(b^2*(b*d - a*e)) - ((A*b - a*B)*(d + e*x)^(3/2))/(b*(b*d - a*e)*(
a + b*x)) - ((2*b*B*d + A*b*e - 3*a*B*e)*ArcTanh[(Sqrt[b]*Sqrt[d + e*x])/Sqrt[b*d - a*e]])/(b^(5/2)*Sqrt[b*d -
 a*e])

________________________________________________________________________________________

Rubi [A]  time = 0.115127, antiderivative size = 140, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {27, 78, 50, 63, 208} \[ \frac{\sqrt{d+e x} (-3 a B e+A b e+2 b B d)}{b^2 (b d-a e)}-\frac{(-3 a B e+A b e+2 b B d) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{d+e x}}{\sqrt{b d-a e}}\right )}{b^{5/2} \sqrt{b d-a e}}-\frac{(d+e x)^{3/2} (A b-a B)}{b (a+b x) (b d-a e)} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*Sqrt[d + e*x])/(a^2 + 2*a*b*x + b^2*x^2),x]

[Out]

((2*b*B*d + A*b*e - 3*a*B*e)*Sqrt[d + e*x])/(b^2*(b*d - a*e)) - ((A*b - a*B)*(d + e*x)^(3/2))/(b*(b*d - a*e)*(
a + b*x)) - ((2*b*B*d + A*b*e - 3*a*B*e)*ArcTanh[(Sqrt[b]*Sqrt[d + e*x])/Sqrt[b*d - a*e]])/(b^(5/2)*Sqrt[b*d -
 a*e])

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(A+B x) \sqrt{d+e x}}{a^2+2 a b x+b^2 x^2} \, dx &=\int \frac{(A+B x) \sqrt{d+e x}}{(a+b x)^2} \, dx\\ &=-\frac{(A b-a B) (d+e x)^{3/2}}{b (b d-a e) (a+b x)}+\frac{(2 b B d+A b e-3 a B e) \int \frac{\sqrt{d+e x}}{a+b x} \, dx}{2 b (b d-a e)}\\ &=\frac{(2 b B d+A b e-3 a B e) \sqrt{d+e x}}{b^2 (b d-a e)}-\frac{(A b-a B) (d+e x)^{3/2}}{b (b d-a e) (a+b x)}+\frac{(2 b B d+A b e-3 a B e) \int \frac{1}{(a+b x) \sqrt{d+e x}} \, dx}{2 b^2}\\ &=\frac{(2 b B d+A b e-3 a B e) \sqrt{d+e x}}{b^2 (b d-a e)}-\frac{(A b-a B) (d+e x)^{3/2}}{b (b d-a e) (a+b x)}+\frac{(2 b B d+A b e-3 a B e) \operatorname{Subst}\left (\int \frac{1}{a-\frac{b d}{e}+\frac{b x^2}{e}} \, dx,x,\sqrt{d+e x}\right )}{b^2 e}\\ &=\frac{(2 b B d+A b e-3 a B e) \sqrt{d+e x}}{b^2 (b d-a e)}-\frac{(A b-a B) (d+e x)^{3/2}}{b (b d-a e) (a+b x)}-\frac{(2 b B d+A b e-3 a B e) \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{d+e x}}{\sqrt{b d-a e}}\right )}{b^{5/2} \sqrt{b d-a e}}\\ \end{align*}

Mathematica [A]  time = 0.168957, size = 119, normalized size = 0.85 \[ \frac{\frac{(-3 a B e+A b e+2 b B d) \left (\sqrt{b} \sqrt{d+e x}-\sqrt{b d-a e} \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{d+e x}}{\sqrt{b d-a e}}\right )\right )}{b^{3/2}}+\frac{(d+e x)^{3/2} (a B-A b)}{a+b x}}{b (b d-a e)} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*Sqrt[d + e*x])/(a^2 + 2*a*b*x + b^2*x^2),x]

[Out]

(((-(A*b) + a*B)*(d + e*x)^(3/2))/(a + b*x) + ((2*b*B*d + A*b*e - 3*a*B*e)*(Sqrt[b]*Sqrt[d + e*x] - Sqrt[b*d -
 a*e]*ArcTanh[(Sqrt[b]*Sqrt[d + e*x])/Sqrt[b*d - a*e]]))/b^(3/2))/(b*(b*d - a*e))

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 186, normalized size = 1.3 \begin{align*} 2\,{\frac{B\sqrt{ex+d}}{{b}^{2}}}-{\frac{Ae}{b \left ( bex+ae \right ) }\sqrt{ex+d}}+{\frac{aBe}{{b}^{2} \left ( bex+ae \right ) }\sqrt{ex+d}}+{\frac{Ae}{b}\arctan \left ({b\sqrt{ex+d}{\frac{1}{\sqrt{ \left ( ae-bd \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( ae-bd \right ) b}}}}-3\,{\frac{aBe}{{b}^{2}\sqrt{ \left ( ae-bd \right ) b}}\arctan \left ({\frac{\sqrt{ex+d}b}{\sqrt{ \left ( ae-bd \right ) b}}} \right ) }+2\,{\frac{Bd}{b\sqrt{ \left ( ae-bd \right ) b}}\arctan \left ({\frac{\sqrt{ex+d}b}{\sqrt{ \left ( ae-bd \right ) b}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)^(1/2)/(b^2*x^2+2*a*b*x+a^2),x)

[Out]

2*B/b^2*(e*x+d)^(1/2)-1/b*(e*x+d)^(1/2)/(b*e*x+a*e)*A*e+1/b^2*(e*x+d)^(1/2)/(b*e*x+a*e)*a*B*e+1/b/((a*e-b*d)*b
)^(1/2)*arctan((e*x+d)^(1/2)*b/((a*e-b*d)*b)^(1/2))*A*e-3/b^2/((a*e-b*d)*b)^(1/2)*arctan((e*x+d)^(1/2)*b/((a*e
-b*d)*b)^(1/2))*a*B*e+2/b/((a*e-b*d)*b)^(1/2)*arctan((e*x+d)^(1/2)*b/((a*e-b*d)*b)^(1/2))*B*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.40288, size = 822, normalized size = 5.87 \begin{align*} \left [\frac{{\left (2 \, B a b d -{\left (3 \, B a^{2} - A a b\right )} e +{\left (2 \, B b^{2} d -{\left (3 \, B a b - A b^{2}\right )} e\right )} x\right )} \sqrt{b^{2} d - a b e} \log \left (\frac{b e x + 2 \, b d - a e - 2 \, \sqrt{b^{2} d - a b e} \sqrt{e x + d}}{b x + a}\right ) + 2 \,{\left ({\left (3 \, B a b^{2} - A b^{3}\right )} d -{\left (3 \, B a^{2} b - A a b^{2}\right )} e + 2 \,{\left (B b^{3} d - B a b^{2} e\right )} x\right )} \sqrt{e x + d}}{2 \,{\left (a b^{4} d - a^{2} b^{3} e +{\left (b^{5} d - a b^{4} e\right )} x\right )}}, \frac{{\left (2 \, B a b d -{\left (3 \, B a^{2} - A a b\right )} e +{\left (2 \, B b^{2} d -{\left (3 \, B a b - A b^{2}\right )} e\right )} x\right )} \sqrt{-b^{2} d + a b e} \arctan \left (\frac{\sqrt{-b^{2} d + a b e} \sqrt{e x + d}}{b e x + b d}\right ) +{\left ({\left (3 \, B a b^{2} - A b^{3}\right )} d -{\left (3 \, B a^{2} b - A a b^{2}\right )} e + 2 \,{\left (B b^{3} d - B a b^{2} e\right )} x\right )} \sqrt{e x + d}}{a b^{4} d - a^{2} b^{3} e +{\left (b^{5} d - a b^{4} e\right )} x}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")

[Out]

[1/2*((2*B*a*b*d - (3*B*a^2 - A*a*b)*e + (2*B*b^2*d - (3*B*a*b - A*b^2)*e)*x)*sqrt(b^2*d - a*b*e)*log((b*e*x +
 2*b*d - a*e - 2*sqrt(b^2*d - a*b*e)*sqrt(e*x + d))/(b*x + a)) + 2*((3*B*a*b^2 - A*b^3)*d - (3*B*a^2*b - A*a*b
^2)*e + 2*(B*b^3*d - B*a*b^2*e)*x)*sqrt(e*x + d))/(a*b^4*d - a^2*b^3*e + (b^5*d - a*b^4*e)*x), ((2*B*a*b*d - (
3*B*a^2 - A*a*b)*e + (2*B*b^2*d - (3*B*a*b - A*b^2)*e)*x)*sqrt(-b^2*d + a*b*e)*arctan(sqrt(-b^2*d + a*b*e)*sqr
t(e*x + d)/(b*e*x + b*d)) + ((3*B*a*b^2 - A*b^3)*d - (3*B*a^2*b - A*a*b^2)*e + 2*(B*b^3*d - B*a*b^2*e)*x)*sqrt
(e*x + d))/(a*b^4*d - a^2*b^3*e + (b^5*d - a*b^4*e)*x)]

________________________________________________________________________________________

Sympy [B]  time = 36.3605, size = 1251, normalized size = 8.94 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)**(1/2)/(b**2*x**2+2*a*b*x+a**2),x)

[Out]

-2*A*a*e**2*sqrt(d + e*x)/(2*a**2*b*e**2 - 2*a*b**2*d*e + 2*a*b**2*e**2*x - 2*b**3*d*e*x) + A*a*e**2*sqrt(-1/(
b*(a*e - b*d)**3))*log(-a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3)) + 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) - b**2*d
**2*sqrt(-1/(b*(a*e - b*d)**3)) + sqrt(d + e*x))/(2*b) - A*a*e**2*sqrt(-1/(b*(a*e - b*d)**3))*log(a**2*e**2*sq
rt(-1/(b*(a*e - b*d)**3)) - 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) + b**2*d**2*sqrt(-1/(b*(a*e - b*d)**3)) + sq
rt(d + e*x))/(2*b) - A*d*e*sqrt(-1/(b*(a*e - b*d)**3))*log(-a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3)) + 2*a*b*d*e*
sqrt(-1/(b*(a*e - b*d)**3)) - b**2*d**2*sqrt(-1/(b*(a*e - b*d)**3)) + sqrt(d + e*x))/2 + A*d*e*sqrt(-1/(b*(a*e
 - b*d)**3))*log(a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3)) - 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) + b**2*d**2*sqr
t(-1/(b*(a*e - b*d)**3)) + sqrt(d + e*x))/2 + 2*A*d*e*sqrt(d + e*x)/(2*a**2*e**2 - 2*a*b*d*e + 2*a*b*e**2*x -
2*b**2*d*e*x) + 2*A*e*atan(sqrt(d + e*x)/sqrt(a*e/b - d))/(b**2*sqrt(a*e/b - d)) + 2*B*a**2*e**2*sqrt(d + e*x)
/(2*a**2*b**2*e**2 - 2*a*b**3*d*e + 2*a*b**3*e**2*x - 2*b**4*d*e*x) - B*a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3))*
log(-a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3)) + 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) - b**2*d**2*sqrt(-1/(b*(a*e
 - b*d)**3)) + sqrt(d + e*x))/(2*b**2) + B*a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3))*log(a**2*e**2*sqrt(-1/(b*(a*e
 - b*d)**3)) - 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) + b**2*d**2*sqrt(-1/(b*(a*e - b*d)**3)) + sqrt(d + e*x))/
(2*b**2) - 2*B*a*d*e*sqrt(d + e*x)/(2*a**2*b*e**2 - 2*a*b**2*d*e + 2*a*b**2*e**2*x - 2*b**3*d*e*x) + B*a*d*e*s
qrt(-1/(b*(a*e - b*d)**3))*log(-a**2*e**2*sqrt(-1/(b*(a*e - b*d)**3)) + 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3))
- b**2*d**2*sqrt(-1/(b*(a*e - b*d)**3)) + sqrt(d + e*x))/(2*b) - B*a*d*e*sqrt(-1/(b*(a*e - b*d)**3))*log(a**2*
e**2*sqrt(-1/(b*(a*e - b*d)**3)) - 2*a*b*d*e*sqrt(-1/(b*(a*e - b*d)**3)) + b**2*d**2*sqrt(-1/(b*(a*e - b*d)**3
)) + sqrt(d + e*x))/(2*b) - 4*B*a*e*atan(sqrt(d + e*x)/sqrt(a*e/b - d))/(b**3*sqrt(a*e/b - d)) + 2*B*d*atan(sq
rt(d + e*x)/sqrt(a*e/b - d))/(b**2*sqrt(a*e/b - d)) + 2*B*sqrt(d + e*x)/b**2

________________________________________________________________________________________

Giac [A]  time = 1.18555, size = 170, normalized size = 1.21 \begin{align*} \frac{2 \, \sqrt{x e + d} B}{b^{2}} + \frac{{\left (2 \, B b d - 3 \, B a e + A b e\right )} \arctan \left (\frac{\sqrt{x e + d} b}{\sqrt{-b^{2} d + a b e}}\right )}{\sqrt{-b^{2} d + a b e} b^{2}} + \frac{\sqrt{x e + d} B a e - \sqrt{x e + d} A b e}{{\left ({\left (x e + d\right )} b - b d + a e\right )} b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^(1/2)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")

[Out]

2*sqrt(x*e + d)*B/b^2 + (2*B*b*d - 3*B*a*e + A*b*e)*arctan(sqrt(x*e + d)*b/sqrt(-b^2*d + a*b*e))/(sqrt(-b^2*d
+ a*b*e)*b^2) + (sqrt(x*e + d)*B*a*e - sqrt(x*e + d)*A*b*e)/(((x*e + d)*b - b*d + a*e)*b^2)